package model.CheckInInformation;



import model.room.Room;
import model.user.User;

import java.time.LocalTime;
import java.util.ArrayList;
import java.util.List;

/*
 * 入住信息类
 */
public class CheckInInformation {
    private User user;//住的人
    private LocalTime startTime;//入住时间
    private Room room;//住的房
    private LocalTime endTime;//离开时间
    private double price;//价格
    public static List<CheckInInformation> checkInInformations = new ArrayList<>();     //记录所有的入住信息，便于管理查看

    public CheckInInformation(User user, LocalTime startTime, Room room, LocalTime endTime, double price) {
        this.user = user;
        this.startTime = startTime;
        this.room = room;
        this.endTime = endTime;
        this.price = price;
    }

    public User getUSer() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public LocalTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalTime startTime) {
        this.startTime = startTime;
    }

    public Room getRoom() {
        return room;
    }

    public void setRoom(Room room) {
        this.room = room;
    }

    public LocalTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalTime endTime) {
        this.endTime = endTime;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "CheckInInformation{" +
                "user=" + user +
                ", startTime=" + startTime +
                ", room=" + room +
                ", endTime=" + endTime +
                ", price=" + price +
                '}';
    }
}
